<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>用户注册</title>
  <style>
    .error { color: red; }
  </style>
</head>
<body>
<h2>新用户注册</h2>

<div th:if="${errorMessage}" class="error">
  <p th:text="${errorMessage}"></p>
</div>

<form method="post" action="/register">
  <p>用户名: <input type="text" name="userName" required></p>
  <p>邮箱: <input type="email" name="email" required></p>
  <p>密码: <input type="password" name="password" required></p>
  <p><input type="submit" value="注册"></p>
</form>

<br/>
<a href="/login">返回登录页面</a>
</body>
</html>